Event notification services, which actively notify events from server apparatuses to terminals via IP (Internet Protocol) networks, such as an incoming call notification function in VoIP (Voice over Internet Protocol) and an update notification function in SNS (Social Networking Service), have been available. A notification from a server apparatus to a terminal in the event notification services is referred to as a push notification or a push message. A server apparatus which transmits push messages (hereinafter referred to as a push server) receives requests of notification, such as incoming call notifications in VoIP, update notifications in SNS, chat message deliveries, and update notifications of a cloud storage, from a service provider server (hereinafter referred to as an application server). The application server is a server apparatus that a service provider, such as an SNS administrator, uses.
The service provider, by using the application server, requests the push server to deliver a message addressed to application software (hereinafter simply referred to as an application) that the service provider provides. The service provider provides a user with an application to use a service in advance. The user then executes the application provided by the service provider on a terminal.
The push server, by following the message delivery request, transmits a push message to software (hereinafter referred to as a push client) running on the terminal. The push client hands the received message to the addressed application. The application carries out processing in accordance with the contents of the message received from the push client. For example, the application notifies the user of information or acquires updated contents from a contents server by communicating with the contents server.
Terminals use various networks, such as a mobile network and a wireless LAN. In some cases, terminals work under a NAT (Network Address Translation) environment, depending on the network used. That is, in those cases, a router with a NAT function is placed between the push server and the terminals.
The router with a NAT function, by using a NAT translation table, translates global addresses to private addresses, and vice versa, of terminals. The NAT translation table is information that associates an IP address and a port of a terminal with a port of the router. FIG. 8 is an explanatory diagram illustrating an example of the NAT translation table. The “address” column illustrated in FIG. 8 contains IP addresses of terminals. FIG. 9 is an explanatory diagram illustrating a manner in which a packet is transferred from a push server to a terminal via a router.
A terminal 700 illustrated in FIG. 9 is connected to a push server 600 via a router 800 with a NAT function. That is, the terminal 700 is arranged under a NAT. While being in this state, for example, when a push client operating on the terminal 700 is connected by TCP to a push server on the Internet via the router, the router 800 updates the NAT translation table. Specifically, the router 800 stores a private address of the terminal and a port number that the push client uses in the NAT translation table. In this example, it is assumed that the private address is “192.168.0.2” and the port number is “11111”. It is also assumed that the global address of the router is “23.42.64.168”.
When the router 800 transfers packets received from the terminal 700 to the push server 600, the router 800 translates transmission source addresses to the global address of the router 800. Therefore, the push server 600 recognizes the global address of the router 800, not the private address of the terminal 700, as a transmission source address. In consequence, when the push server 600 transmits packets to the terminal 700, the push server 600 transmits the packets to the global address of the router 800. When the router 800 receives packets from the push server 600, the router 800 translates destination addresses of the packets to the private address of the terminal 700 based on the NAT translation table and transfers the packets to the terminal 700.
When there is no communication for a certain time, the IP address and the port number of the terminal stored in the NAT translation table are deleted from the NAT translation table due to a timeout. Thereafter, the router becomes unable to translate destination addresses of packets addressed to the terminal, which are received from the push server, to the private address of the terminal. In consequence, packets transmitted from the push server no longer reach the terminal. Thus, in order to maintain the normal TCP connection between the push server and the terminal, it is necessary for the push server and the terminal to have a periodical communication therebetween so as not to cause a timeout on the NAT translation table. A signal that is transmitted and received between a push server and a terminal to maintain a connection is referred to as a keepalive (KeepAlive) signal (hereinafter also referred to as a connection maintenance signal).
When a terminal uses a mobile network, such as 3G networks and LTE (Long Term Evolution), the terminal switches wireless statuses in accordance with the communication state to save power. For example, the terminal changes the wireless status to a standby status or an active status in accordance with the communication state. In switching the wireless statuses, the terminal transmits and receives control signals to change the wireless status to and from the mobile network. When an application or the like, which operates on the terminal, generates communications periodically, the wireless status on the terminal repeats the standby status and the active status alternately, causing a lot of control signals to flow on the mobile network and congestion to take place on the mobile network.
Accordingly, when transmissions and receptions of keepalive signals are carried out periodically between a push server and a lot of terminals, a processing load on the push server to respond to the keepalive signals increases, and congestion of control signals on the mobile network is more likely to take place.
FIGS. 10A and 10B are explanatory diagrams illustrating transmission cycles of keepalive signals. A NAT translation table held by a router has a different feature with respect to each router. For example, a timeout period of a NAT translation table differs from router to router. Thus, transmission cycles of keepalive signals to a terminal may be set at various values in accordance with a router connected to the terminal. FIG. 10A illustrates waveforms each of which represents a transmission cycle of a keepalive signal transmitted from a push server to each terminal. FIG. 10B illustrates a waveform created by adding up the waveforms for respective terminals illustrated in FIG. 10A. As illustrated in FIG. 10A, when transmission cycles of keepalive signals to the respective terminals differ from one another, there are some instants when transmission times of the keepalive signals to the respective terminals concentrate (portions circled by dotted lines as illustrated in FIG. 10). At those instants, there is a possibility that a load on the push server becomes high.
FIG. 11 is an explanatory diagram illustrating a manner in which the number of keepalive signals increases and decreases in recovery from a network failure. Connections between a push server and respective terminals are sometimes interrupted due to a network failure. In that case, when the network failure is resolved, reconnections between the push server and the respective terminals are carried out at the same time. After that, up to the time that the respective terminals start communication, transmissions and receptions of keepalive signals are carried out periodically between the push server and the respective terminals. During this period, as illustrated in FIG. 11, instants at which transmission times of keepalive signals to the respective terminals concentrate (portions circled by dotted lines as illustrated in FIG. 11) come periodically. Therefore, there is a possibility that a load on the push server becomes high periodically.
When the push server becomes high-loaded, the number of deliverable push messages per unit time decreases. As a result, there is a possibility that the real time property of message delivery is impaired and/or the call loss probability increases.
A communication system that, in a network environment in which a LAN and the Internet are interconnected, makes it possible to easily carry out, at a desirable timing, a connection from a terminal on the Internet side to a device inside the LAN to which private IP addresses are assigned, has been developed (for example, see PTL 1). In a communication system disclosed in PTL 1, a server apparatus placed on the Internet side transfers communications between terminals and devices. Devices inside the LAN, even when not communicating with terminals, transmit keepalive packets to the server apparatus in order to maintain a connection to the server apparatus.